<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <title>
        时间处理的基本使用
    </title>
    <script type="text/javascript" , src="../js/vue.js">  </script>
</head>

<body>
    <div id="root">
        <h1>欢迎来到德莱联盟 {{name}} </h1>
        <!-- <button v-on:click="showInfo">点我更换名字</button> -->
        <button @click="showInfo">点我更换名字</button>
        <button @click="showInfo2(66)">点我更换名字2</button>
    </div>
</body>
<script type="text/javascript">
    Vue.config.productionTip = false
    const vm = new Vue({
        el: '#root',
        data() {
            return {
                name: "阿文"
            }
        },
        methods: {
            showInfo(event) {
                console.log(event)
                // console.log(a,b,c,d)
                // console.log(this === vm)
                alert("欢迎👏🏻")
            },
            showInfo2(id) {
                console.log(id)
                console.log(event.target.innerText)
                // console.log(a,b,c,d)
                // console.log(this === vm)
                alert("showInfo2 欢迎👏🏻")
            }
        },
    })

</script>

</html>